#include <iostream>
#include <ctime>
#include <vector>
#include <fstream>

void readl(string nameFile, vector<int> a) {
    ifstream in(nameFile);
    for (int i = 0; ; i++) {
        in >> a[i];
    }
    return vector<int> a;
}
void bubble_sort(vector<int> a) {
    bool swapped = true;
    while (swapped) {
        bool swapped = false;
        for (int i = 0; i < size(a); i++) {
            for (int j = 0; j < size(a) - 1; i++) {
                if (a[j] > a[j + 1]) {
                    swap(a[j], a[j + 1])
                }
            }
        }
    }
    return vector<int> a;
}

int main() {
    string nameFile = 'm1_sorted.txt';
    int start = clock();
    readl(nameFile);
    bubble_sort(a)
    int finish = clock();
    std::cout << "m1_sorted " << int(finish - start) / CLOCKS_PER_SEC << " milliseconds" << std::endl;
    nameFile = 'm2_reverse.txt';
    int start = clock();
    readl(nameFile)
    bubble_sort(a);
    int finish = clock();
    std::cout << "m2_reverse " << int(finish - start) / CLOCKS_PER_SEC << " milliseconds" << std::endl;
    nameFile = 'm3_shuffle.txt'
    int start = clock();
    readl(nameFile);
    bubble_sort(a);
    int finish = clock();
    std::cout << "m3_shuffle " << int(finish - start) / CLOCKS_PER_SEC << " milliseconds" << std::endl;

}
